/*
 * ir.h
 *
 *  Created on: 2012/1/20
 *      Author: kc.chang
 */

#ifndef IR_H_
#define IR_H_

#include "global.h"

#if INECLIPSE
#include "avrio.h"
#else
#include <avr/io.h>
#endif

#define  IR_IO_PORT  DDRB
#define  IR_OUT_PORT PORTB
#define IR_PIN       PB1
#define  IR_ON  0x03  // PB1 connect to base of NPN (low side of LED)
#define  IR_OFF 0x01

#if INECLIPSE
#define IR_PORT_OUT PortD_Out
#else
#define IR_PORT_OUT(x){IR_OUT_PORT = x; }
#endif

void ir_SendByte(unsigned char b);

#endif /* IR_H_ */
